Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use av-data version 0.3.0 and fix errors #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

officialcjunior
Copy link

Hello.

Rust rookie here- and I was just trying to build opus and it produced this error:

error[E0053]: method `send_packet` has an incompatible type for trait
  --> src/decoder.rs:44:40
   |
44 |         fn send_packet(&mut self, pkt: &AVPacket) -> Result<()> {
   |                                        ^^^^^^^^^
   |                                        |
   |                                        expected struct `av_data::packet::Packet`, found struct `data::packet::Packet`
   |                                        help: change the parameter type to match the trait: `&av_data::packet::Packet`
   |
   = note: expected fn pointer `fn(&mut Dec, &av_data::packet::Packet) -> std::result::Result<_, _>`
              found fn pointer `fn(&mut Dec, &data::packet::Packet) -> std::result::Result<_, _>`

error[E0053]: method `receive_frame` has an incompatible type for trait
   --> src/decoder.rs:129:40
    |
129 |         fn receive_frame(&mut self) -> Result<ArcFrame> {
    |                                        ^^^^^^^^^^^^^^^^
    |                                        |
    |                                        expected struct `av_data::frame::Frame`, found struct `Frame`
    |                                        help: change the output type to match the trait: `std::result::Result<Arc<av_data::frame::Frame>, codec::error::Error>`
    |
    = note: expected fn pointer `fn(&mut Dec) -> std::result::Result<Arc<av_data::frame::Frame>, _>`
               found fn pointer `fn(&mut Dec) -> std::result::Result<Arc<Frame>, _>`

For more information about this error, try `rustc --explain E0053`.
warning: `opus` (lib) generated 3 warnings
error: could not compile `opus` due to 2 previous errors; 3 warnings emitted

I used 0.3.0 of av-data and that seemed to fix it. So, I thought I'll leave a PR and let you know or see what you think.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant